package com.lyc.dao;

import com.lyc.dao.imp.AdminInfoDAOImpl;
import com.lyc.entity.AdminInfo;
import org.junit.jupiter.api.Test;

import java.sql.SQLException;
import java.text.ParseException;
import java.util.Date;

/**
 * @Program: medal
 * @Author: YC
 * @Date: 2022/5/5 17:48
 */

public class AdminInfoDAOTest {
    private AdminInfoDAO dao = new AdminInfoDAOImpl();

    @Test
    public void insert() throws SQLException{
        dao.insert(new AdminInfo(null,"admin4","123",new Date()));
    }


    @Test
    public void select()throws SQLException{
        System.out.println(dao.selectById(1));
        System.out.println(dao.select(0,5));
    }

    @Test
    public void updateByid() throws SQLException{
        dao.updateById(new AdminInfo(3,"admin1","123",new Date()));
    }

    @Test
    public void deleteByid() throws SQLException{
        dao.deleteById(4);
    }

}
